import logging,yagmail

def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(levelname)s_%(asctime)s_%(message)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])

def send_mail(a):
    mail=yagmail.SMTP(user='2331638070@qq.com',password='zrrwereosvrnecdi',host='smtp.qq.com')
    mail.send(to='2331638070@qq.com',subject='测试报告标题',contents='测试报告内容',attachments=a)